package heap

func LookupMethodInClass(class *Class, name, descriptor string) *Method {
	for c := class; c != nil; c = c.SuperClass {
		for _, method := range c.Methods {
			if method.Check(name, descriptor) {
				return method
			}
		}
	}
	return nil
}
